
import ReactDOM from 'react-dom/client'; //React专门操作Dom的核心库
//react定义组件可以通过函数/类的方式来定义组件
import App from './App';
import reportWebVitals from './reportWebVitals';
import { BrowserRouter as Router } from "react-router-dom"

//创建渲染的容器
const root = ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
);
//将组件渲染到root这个容器中
//组件在react中,所有的首字母都必须大写
root.render(

  <Router>
    <App />
  </Router>

);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
